const isDev = () => {
  const argv = JSON.parse(JSON.stringify(process.argv))
  const paramsStr = argv.splice(2)[0]
  return paramsStr
}

// 默认生产模式
let domainName = 'http://www.caicailv.cn'
let db = {
  host: 'localhost', // 数据库地址
  user: 'root', // 数据库用户
  password: '13589', // 数据库密码
  database: 'ccl_blog', // 选中数据库
}
if (isDev()) {
  //开发模式
  domainName = 'http://localhost'
  db = {
    host: 'localhost',
    user: 'root',
    password: '123456',
    database: 'ccl_mysql',
  }
}
export const dbConfig = db
export const serviceConfig = {
  localhost: 3007,
  domainName,
}
